﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//记录坐标点数据
public class Grid
{
    public Vector2 grid;
    public Vector2 position;//世界坐标
    public bool havePlant;//限制植物

    private PlantBase currPlantBase;

    public Grid(Vector2 grid, Vector2 position, bool havePlant)
    {
        this.grid = grid;
        this.position = position;
        this.havePlant = havePlant;
    }

    public PlantBase CurrPlantBase { get => currPlantBase; set
        {
            currPlantBase = value;
            if (currPlantBase== null)
            {
                havePlant = false;
            }
            else
            {
                havePlant = true;
            }
        } 
    }
}
